Ext.onReady(function(){
	var top_panel=new Ext.Panel({
		height:100,
		title:'top',
		region:'north'
	});
	var user_node=new Ext.tree.TreeNode({
		text:'人员管理',
		expanded:true
	});
	user_node.appendChild(new Ext.tree.TreeNode({
		leaf:true,
		text:'管理人员管理',
		url:'AdminManage.jsp'
	}));
	user_node.appendChild(new Ext.tree.TreeNode({
		text:'老师管理',
		leaf:true,
		url:'TeacherManage.jsp'
	}));
	user_node.appendChild(new Ext.tree.TreeNode({
		text:'学生管理',
		leaf:true,
		url:'StudentManage.jsp'
	}));
	
	var course_node=new Ext.tree.TreeNode({
		url:'CourseManage.jsp',
		text:"课程管理",
		expanded:true
	});
	var other_node=new Ext.tree.TreeNode({
		text:"其他",
		expanded:true
	});
	other_node.appendChild(new Ext.tree.TreeNode({
		text:'个人信息管理'
	}));
	other_node.appendChild(new Ext.tree.TreeNode({
		text:'系统配置'
	}));
	var root=new Ext.tree.TreeNode({
		text:'管理员'
	});
	root.appendChild(user_node);
	root.appendChild(course_node);
	root.appendChild(other_node);
	var tree_panel=new Ext.tree.TreePanel({
		width:150,
		root:root,
		region:'west',
		collapsible:true,
		border:false,
		listeners:{click:function(node,e){
			content_panel.add({
				closable:true,
				id:node.attributes.url,
				title:node.attributes.text,
				autoLoad:{
					loadMask:true,
					url:node.attributes.url,
					scripts:true
				}
			}).show();

		}}
	});
	var content_panel=new Ext.TabPanel({
		region:'center'
	});
	content_panel.add({
				closable:false,
				id:'StudentManage.jsp',
				title:"学生管理",
				autoLoad:{
					loadMask:true,
					url:'StudentManage.jsp',
					scripts:true
				}
			}).show();
	content_panel.setActiveTab(0);
	var main_panel=new Ext.Panel({
		layout:'border',
		region:'center',
		border:false,
		items:[
			tree_panel,
			content_panel
		]
	});
	new Ext.Viewport({
		layout:'border',
		items:[
			top_panel,
			main_panel
		]
	});
});